package com.hubu.map;
import com.hubu.tree.BPlusTree;
import java.util.Comparator;
/**
 *
 * 使用B+树实现Map
 */
public class BTreeMap<K,V> {
    public BPlusTree<K,V> tree;
    private Comparator<K> comparator;
    public BTreeMap(Comparator<K> comparator){
        tree=new BPlusTree<>(comparator);
    }
    public BTreeMap(){
        this(null);
    }
    public V put(K key,V value){
        return tree.put(key,value);
    }
    public V get(K key){
        return tree.get(key);
    }
    public V remove(K key){
        return tree.remove(key);
    }
    public int size(){
        return tree.size();
    }
}
